package com.restkeeper.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang.StringUtils;

@Getter
@AllArgsConstructor
public enum SmsTemplateIdEum {

    /**
     * 告警消息
     * */
    alarm("alarm", "欣佳电报警通知","SMS_475845097"),

    ;

    public String name;
    public String signName;
    public String templateCode;

    public static SmsTemplateIdEum getSmsConfigByName(String name) {
        if(StringUtils.isBlank(name))
            return null;
        for (SmsTemplateIdEum incomeTypeEnum : SmsTemplateIdEum.values()) {
            if (incomeTypeEnum.name.equals(name)) {
                return incomeTypeEnum;
            }
        }
        return null;
    }


}
